

HOME=..
classpath  =$(HOME)/java_bind/aloha.jar:$(HOME)/sdk/json/json-20220320.jar:$(HOME)/sdk/freemarker/freemarker-2.3.28.jar:build/app.jar
java_param =-Dfile.encoding=UTF-8 -Xmx320m -Xms320m -Xss48k


.PHONY:app.jar
# export LD_LIBRARY_PATH=`pwd`/build/linux/x86_64/release:$LD_LIBRARY_PATH
# ../jamvm_output/bin/jamvm -cp aloha.jar aloha.lv.Disp
run:app.jar native
	echo ${LD_LIBRARY_PATH}
	LD_LIBRARY_PATH=`pwd`/build/linux/x86_64/release:kissfft:${LD_LIBRARY_PATH} solomen $(java_param) -cp $(classpath) ly.Main

app.jar:
	ant build-jar

native:
	ant build-header
	xmake -v -P . player_jni

clean:
	-ant clean
	-rm -rf build

.PHONY:fft_test
fft_test:demo/fft_test.cpp
	g++ -g -o $@ $< kissfft/libkissfft-float.so
	LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:kissfft ./fft_test

#../../build/linux/x86_64/release/solomen -Dfile.encoding=UTF-8 -Xmx320m -Xms320m -cp \
